Can you have 2 data grids in one stack?

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
donryan
Posts: 32
Joined: Mon Jul 23, 2012 1:09 pm

Can you have 2 data grids in one stack?

Post by donryan » Mon Jul 23, 2012 4:27 pm

I'm developing an iOS application. On the main card, I've got a data grid object and have 2 fields setup using the "form" setting. All is well and the first card works flawlessly.

I added a second card and added a new data grid to that card. The problem is that when I go to customize the form on the new data grid, LiveCode is applying the modifications to the first data grid. This doesn't make any sense to me. What do I need to do so that I can customize this second data grid without impacting the first data grid? :?
LiveCode 5.5.3 -- OS X 10.8.2

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Can you have 2 data grids in one stack?

Post by BvG » Mon Jul 23, 2012 4:49 pm

I use datagrids on the same card and don't have this problem. I also made a quick test with two cards and changing random datagrid properties around, and did not see this. Did you maybe accidentally delete the datagrid helper stack? Does the problem appear in the IDE or only on compiled mobile platform?
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

donryan
Posts: 32
Joined: Mon Jul 23, 2012 1:09 pm

Re: Can you have 2 data grids in one stack?

Post by donryan » Mon Jul 23, 2012 4:55 pm

Not sure -- where can I go to find the data grid helper stack?
LiveCode 5.5.3 -- OS X 10.8.2

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Can you have 2 data grids in one stack?

Post by BvG » Tue Jul 24, 2012 2:16 pm

Does the problem appear in the IDE or only when you test your app in iOS /the iOS simulator? How do you change the properties, and how do you check wether it's not doing what you want? give more details please.

stacks can mean several things:
a stack is a file on the hard drive
a stack is the window you see on screen
a stack is a mainstack
any substacks are stacks

Any stack can be a mainstack, and can have several substacks. The datagrid creates a stack where it stores layout information and some properties. That stack is made as a substack of the stack where the datagrid is (or as a substack of that's stack mainstack, because substacks can't be mainstacks at the same time).


read up on stacks in the documentation (page 38 in the user guide).
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

donryan
Posts: 32
Joined: Mon Jul 23, 2012 1:09 pm

Re: Can you have 2 data grids in one stack?

Post by donryan » Tue Jul 24, 2012 2:42 pm

It happens in the IDE. When I bring up the 2nd DG property inspector, press the Row Behavior button, the window that is display states "Editing template for group "Data Grid 1" of card "frmMain" of stack..." -- Yet -- is should be editing Data Grid 2 since I selected the button on the property inspector of Data Grid 2.

This problem is occurring on both my desktop running 10.8 and my laptop running 10.7 (both using LiveCode 5.5.1). So I don't understand how this exact same problem is happening on two different computers.

UPDATE: I found a work around: If I bring up the property inspector of DG1, then lock it, then bring up property inspector of DG2, everything seems to work as expected. Haven't tried programming it yet, but at least the window titles are reporting correctly. :roll:
LiveCode 5.5.3 -- OS X 10.8.2

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Can you have 2 data grids in one stack?

Post by phaworth » Sat Aug 18, 2012 3:25 am

Did you create the second datagrid from scratch or copy/paste it from the first card, or perhaps copy the whole of card 1 to get card 2? If so, the the 2 datagrids are sharing the same Datagrid template. To get round that, delete the datagrid from the second card (be sure to answer no to the prompt for deleting it's template otherwise the first datagrid will stop working), then build a new datagrid on card 2 by dragging and dropping one from the tools palette.
Pete

richervin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 54
Joined: Sat Sep 17, 2011 5:04 pm

Re: Can you have 2 data grids in one stack?

Post by richervin » Tue Sep 04, 2012 9:27 pm

I have the same problem.

In my case, I copy/pasted a group which contained a data grid.

Now, neither of my data grids are working correctly.

However, deleting the second data grid did not fix the problem. My first data grid still does not work. Furthermore, my group has stopped processing some messages correctly.

This is happening in the IDE for an Android project.

One of a number of inconsistent behaviors in the IDE.

I suggest to ALWAYS make backup copy of your stack every time you get a new complex widget working. Luckily I have a backup from when I first got the first data grid working.
LiveCode 5.1.1 on Mac OS Mountain Lion
Attempting to develop for Android and iPhone
Currently on my third trial, and still finding LiveCode to be difficult for mobile applications in general, and particularly poor for Android

Post Reply