Text in Fields not Copying & Control IDs
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Text in Fields not Copying & Control IDs
Hi All,
I have a series of fields on a card which are part of a group. In my code, I am copying the group to another card, but in doing so, the text/contents of the field is not persisting, but is being changed to empty. The copy process is a simple single line of code, similar to "copy the grp "Cell" on the card "CellCard" to this card". Items are not being copied one at a time.
Has anybody ever come across this behavior before? This is something that used to work fine, but is now not working.
Also, is there a limitation on the range of a control ID number? In testing my app, I am creating controls & groups via script. Currently, objects are being generated having control IDs in the +14,000 range. Will this generate problems at some point? Is there a way to reset or renumber control IDs?
Thanks for your help.
Joel
I have a series of fields on a card which are part of a group. In my code, I am copying the group to another card, but in doing so, the text/contents of the field is not persisting, but is being changed to empty. The copy process is a simple single line of code, similar to "copy the grp "Cell" on the card "CellCard" to this card". Items are not being copied one at a time.
Has anybody ever come across this behavior before? This is something that used to work fine, but is now not working.
Also, is there a limitation on the range of a control ID number? In testing my app, I am creating controls & groups via script. Currently, objects are being generated having control IDs in the +14,000 range. Will this generate problems at some point? Is there a way to reset or renumber control IDs?
Thanks for your help.
Joel
Re: Text in Fields not Copying & Control IDs
Joel-
Check the sharedText property of the fields in the group. If it's not selected then the fields on different cards can have different content.
IDs: yes, there's a limit, but it's big and I can't remember the details.
The stack ID will determine the IDs of the created objects.
You can set the stack's ID higher than the current value but not lower.
set the id of stack "xyzzy" to 15000
create button
put the id of it -- should give you 15001
-- but now you can't set the stack id below 15001.
Check the sharedText property of the fields in the group. If it's not selected then the fields on different cards can have different content.
IDs: yes, there's a limit, but it's big and I can't remember the details.
The stack ID will determine the IDs of the created objects.
You can set the stack's ID higher than the current value but not lower.
set the id of stack "xyzzy" to 15000
create button
put the id of it -- should give you 15001
-- but now you can't set the stack id below 15001.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Text in Fields not Copying & Control IDs
Thanks. That did the trick. Strange that these fields stopped matching after copying, when for some time now (during development) they matched properly. There were no changes to code that should have triggered this, which lead me to question about the ID issue, as I thought there might be some related memory concern.
If my app generates objects as a result of executing, is there not the possibility that in the hands of a user, upon repeated uses, ID nos. could be exhausted? Up until now, I had not considered this as an issue, but perhaps it is.
If my app generates objects as a result of executing, is there not the possibility that in the hands of a user, upon repeated uses, ID nos. could be exhausted? Up until now, I had not considered this as an issue, but perhaps it is.
Re: Text in Fields not Copying & Control IDs
The max. number of objects in a stack = uint4 = 4,294,967,295!
So the number of IDs may be similar and should be enough to get started
So the number of IDs may be similar and should be enough to get started

Re: Text in Fields not Copying & Control IDs
Thanks Klaus. I feel relieved....
Re: Text in Fields not Copying & Control IDs

(Filler stuff to get over the lousy "Your message contains 2 characters. The minimum number of characters you need to enter is 10." dialog)
Re: Text in Fields not Copying & Control IDs
Experimentally, I think the practical number may be less half that amount.
I can't set the id of a new stack to anything greater than 2147483640.
And things start getting weird after that. Routines that rely on ids don't handle integer overflows very well.
The engine/IDE starts getting very flaky.
I can't set the id of a new stack to anything greater than 2147483640.
And things start getting weird after that. Routines that rely on ids don't handle integer overflows very well.
The engine/IDE starts getting very flaky.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Text in Fields not Copying & Control IDs
Once your standalone is closed all new ID's are removed, they only keep increasing for you because you save your stack after testing.If my app generates objects as a result of executing, is there not the possibility that in the hands of a user, upon repeated uses, ID nos. could be exhausted?
Yes, it would be cool if one could reassign ID's but I don't think that's possible.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Text in Fields not Copying & Control IDs
Hi Simon,
Perhaps I didn't explain myself properly.
In my app, objects are created dynamically by the user. For example, I am creating cells with graphic objects, the cells house fields, and all are grouped on different cards to create a view. These views are then copied to a main card. The process of pressing a button to populate a screen generates many new objects. After repeated runs of the app during development, I'm now up to object id's in the 20,000s.
Are you saying that object id's only exist in the development environment, and that as a standalone on an iOS device, they are not an issue?
Joel
Perhaps I didn't explain myself properly.
In my app, objects are created dynamically by the user. For example, I am creating cells with graphic objects, the cells house fields, and all are grouped on different cards to create a view. These views are then copied to a main card. The process of pressing a button to populate a screen generates many new objects. After repeated runs of the app during development, I'm now up to object id's in the 20,000s.
Are you saying that object id's only exist in the development environment, and that as a standalone on an iOS device, they are not an issue?
Joel
Re: Text in Fields not Copying & Control IDs
Hi Joel,
Sorry no, there are still ID's in a standalone.
Just, as you repeatedly create new objects during development the ID's increment and once you save your stack the ID's remain.
Lets say you are testing and you have 10 objects that are dynamically created each time you press btn "Create". You press that button 10 times and your ID's have increased by 100. You save and close the stack and then when you open it again the ID's have been recorded at +100 so the next "Create" gives you 110.
In the standalone there is no saving so the numbers will only increase for each "Create", maybe they do that 100 times but when they close the app the ID's drop back to where the developer last saved.
Simon
EDIT: Just saw your Splash Stack post.... Do you intend on saving the new dynamic elements? Now that's a different fish.
EDIT2: ooops...wasn't you
Sorry no, there are still ID's in a standalone.
Just, as you repeatedly create new objects during development the ID's increment and once you save your stack the ID's remain.
Lets say you are testing and you have 10 objects that are dynamically created each time you press btn "Create". You press that button 10 times and your ID's have increased by 100. You save and close the stack and then when you open it again the ID's have been recorded at +100 so the next "Create" gives you 110.
In the standalone there is no saving so the numbers will only increase for each "Create", maybe they do that 100 times but when they close the app the ID's drop back to where the developer last saved.
Simon
EDIT: Just saw your Splash Stack post.... Do you intend on saving the new dynamic elements? Now that's a different fish.
EDIT2: ooops...wasn't you

I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!