It is currently Tue Apr 25, 2017 11:22 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Some difficulties with GW_AMODIFY a array$[] for controls...
Unread postPosted: Wed Dec 07, 2016 6:01 am 
Offline

Joined: Sat Mar 02, 2013 11:04 am
Posts: 814
Location: France
Hi Nicolas,

In fact I'm facing 2 problems :
1/ is about a GW_AMODIFY () of a LISTVIEW array$[] : with a same code launched on my tablet and on my smartphone give me 2 different results for GW_AMODIFY (...)
- on the tablet it work very well
- on the smartphone nothing is happening.

2/ is about a GW_AMODIFY () of a SELECTBOX array$[] : I modify the content of the array$[] then I use GW_AMODIFY (id, "content", newarray$[]) and all is fine the first time I display the page where is the SELECTBOX. I change of page (without modify the selectbox array$[]) then I return to the first page and the SELECTBOX show me the array$[] BEFORE any changes...
I obviously carefully controlled my management of the array$[] a lot of times before ask you my problem ;)

Cheers

Gilles

_________________
"It is better to mobilize intelligence for stupid things, rather than mobilizing stupidity for intelligent things."
Galaxy TAB S 8.4, 2560x1600, Marshmallow 6.0.1
Galaxy Note II, 1280x720, JB4.1.2
Galaxy A3, 1280x720, Android 6.0.1


Last edited by Cassiope34 on Thu Dec 08, 2016 2:07 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Some difficulties with GW_AMODIFY a array$[] for control
Unread postPosted: Wed Dec 07, 2016 7:10 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5485
Location: Paris, France
Hi Gilles,

1/ Can you share a snippet ?

2/ Well yes, that is how it works.
When you RENDER a PAGE, you render the static copy of it that you built with the GW_ADD* commands.
Anything you MODIFY / AMODIFY after that is dynamic change via Javascript.
You need to apply the same modifications after your GW_RENDER to refresh the content.
See the GW demo > Third party libs section for example (with some GW_DISABLE after the GW_RENDER and before the GW_WAIT_ACTION$)
Or simply the GW demo > Basic controls > Buttons with a GW_HIDE after the GW_RENDER.
Or also the GW demo > Advanced > Video ; or Advanced > Progressbar with a set of different GW_SET_PROGRESSBAR() ...

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
 Post subject: Re: Some difficulties with GW_AMODIFY a array$[] for control
Unread postPosted: Thu Dec 08, 2016 7:00 am 
Offline

Joined: Sat Mar 02, 2013 11:04 am
Posts: 814
Location: France
mougino wrote:
Hi Gilles,

1/ Can you share a snippet ?
Obviously not Nicolas?? Except to give you all of my code :evil:
Sometimes it work on my smartphone...!?!
mougino wrote:
2/ Well yes, that is how it works.
When you RENDER a PAGE, you render the static copy of it that you built with the GW_ADD* commands.
Anything you MODIFY / AMODIFY after that is dynamic change via Javascript.
You need to apply the same modifications after your GW_RENDER to refresh the content.
See the GW demo > Third party libs section for example (with some GW_DISABLE after the GW_RENDER and before the GW_WAIT_ACTION$)
Or simply the GW demo > Basic controls > Buttons with a GW_HIDE after the GW_RENDER.
Or also the GW demo > Advanced > Video ; or Advanced > Progressbar with a set of different GW_SET_PROGRESSBAR() ...

Nicolas
Ok Nicolas : I finally understood :)
So if we modify the initial declared SELECTBOX / LISTVIEW / etc... array$[] then we MUST definitely use GW_AMODIFY after GW_RENDER the page that content those controls.

Cheers

Gilles

_________________
"It is better to mobilize intelligence for stupid things, rather than mobilizing stupidity for intelligent things."
Galaxy TAB S 8.4, 2560x1600, Marshmallow 6.0.1
Galaxy Note II, 1280x720, JB4.1.2
Galaxy A3, 1280x720, Android 6.0.1


Top
 Profile  
 
 Post subject: Re: Some difficulties with GW_AMODIFY a array$[] for control
Unread postPosted: Thu Dec 08, 2016 7:19 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5485
Location: Paris, France
Cassiope34 wrote:
Sometimes it work on my smartphone...!?!

That must be a race condition then!
If you can't give me a small snippet, can you at least tell me where you call this GW_AMODIFY grosso modo ?
Is it immediately after the GR_RENDER() ? Or is it after another GW_MODIFY ? etc.
I'm interested to know the arrangement of your control modification routine.

Cassiope34 wrote:
Ok Nicolas : I finally understood :)
So if we modify the initial declared SELECTBOX / LISTVIEW / etc... array$[] then we MUST definitely use GW_AMODIFY after GW_RENDER the page that content those controls.

Yes you got it ;)

I should really write a tutorial for GW programs !!
But this takes a lot of time, and I'm already on so much things :oops:
I'm trapped in a corner on the BLE experimentation, this is too complex and I go nowhere... I'm afraid I will have to drop it :cry:
And I'm still working on my GW App Composer, on the GW architecture change to remove LISTs and use BUNDLE #1, on the adaptive/responsive web design for GW... I don't have enough time :evil:

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred