PDA

View Full Version : found new bug



limboo
08-07-2009, 10:08 AM
just see for yourself in the attached .apz
it's a real bug bug concerning the action "window.setsize"

IR you really have to open this .apz
please

update: there is one fault in my text on the first page of the .apz it has nothing to do with the combobox.setselected but it won't select because the combobox.additem won't add items if he can't see the combobox so combobox.setselected has nothing to select

Ulrich
08-07-2009, 10:30 AM
I don't see any bug.

You say that, on page 3, the text should appear on the left side, not inside the shape, on the right side. Yet you placed the RichText1 over the Shape, and in On Show you issue

RichText.SetText("RichText1", "The new text...", false);
So what exactly do you expect? It would be a bug if the text wasn't shown where it is. Maybe you should first check your project?

Ulrich

limboo
08-07-2009, 10:47 AM
ulrich

the white one doesn't draw correct the border is missing
the shape is just for clarification so that you can see where the white one is
and the shape is transparent so it should do it perfectly but because off the bug it won't

just click on it and you will see that you can write in it, and you can't write in a shape so it must be the richtext right?

limboo
08-07-2009, 10:51 AM
and i think your trying to just find a stupid little thing so you don't have to admit there is a bug because you don't say a word about the rest off the examples aka combobox and the yellow richtext

limboo
08-07-2009, 10:55 AM
"nevermind"

limboo
08-07-2009, 11:22 AM
here is a more clear .apz

and for ulrich (ive placed the shape under the richtext this time and made a shape that doesn't look like a border of the richtext
and i've added some text to both richtext2 (the one on the right side)
that will only show on page 2 on page 3 the richtext won't draw correctly

and please change the edit time to 30 a 1hour not this pathetic 15 min

Ulrich
08-07-2009, 11:43 AM
I have answered about the RichText... Remember that the Shape and RickText are both windowed objects, and that you shouldn't overlap these windows, because you can't control the z-order.

I am still checking this. It looks like you can't access some objects when they are off-screen, like the ComboBox on page 3. It was never created in memory at this point (you resized the window before the object was ever displayed), so I suppose the mistake is that AMS should signal an error, in this case, instead of returning 0 (success).
If you remove the line

Window.SetSize(Application.GetWndHandle(), 640, 125);
form the On Preload event, and place it at the end of On Show, you will see that it works perfectly.

Worm
08-07-2009, 11:51 AM
I could be wrong, but I don't think AMS creates a windowed object until it is shown in the visble page area. I remember that I had to do some creative coding to overcome this with some projects. Setting the width to 1x1 up in a corner of the app is what I ended up doing. This way, the plugin/windowed object was created.

2 pennies...

limboo
08-07-2009, 11:52 AM
if you delete the shape it still does the same, i've checked it
but its just for clarification

and thanks for your reply
i understand now

and worm thats the fun part if the object eg combobox is not in the 1x1 pixels it will still do the same
just open my .apz file and you will see that i've only resized to a point that you can't see the combobox anymore

@ulrich about the put it at the end of on show
thats the whole point i want to let the page start hidden load stuff and then show
but you can't use window.hide when the page hasn't been shown so you must use it at on show but then you get an anoying flikker of showing and hiding

so i thought i can change the size when the page hasn't been shown so i put an window.setsize on "on startup"
but then it won't fill my combobox because you can only fill the combobox when the page has been shown because else it hasn't been loaded into the mem yet.

maybe thats a nice feature load everything on startup in the mem and not when it will be shown offcourse excluding things that are marked as not visible

or a way to start the app hidden. eg. like in Java you have to enable the visible state


so what do you suggest doing?

Ulrich
08-07-2009, 12:21 PM
Ok, I have discussed this with one of the developers at IR. I was told that this is the standard behavior for several versions, but he agreed to enter this a suggestion. In my opinion, if an object wasn't yet created in memory when an action is performed on it, this action should return an error, so you can retry that action at a later moment, when the object is accessible. This was entered with the ref. number 18859, and this may be altered in a future release of AMS.

As for the flickering, why don't you apply a mask first, and then resize the window? (Edit: No, this doesn't produce the desired result either.)

Ulrich

limboo
08-07-2009, 12:25 PM
thats ok with me then.
but is there any way to hide the app before it shows and still load everything
so that my combobox will be updated etc.
because window.hide won't work before it shows and window.setsize won't work because it won't load everything

any suggestions?