dataGrid - set the dgData[TRUE] to tText

18 messages Options
Embed this post
Permalink
Shao Sean-2

dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
should the following not work? line 1 "moo" and "cow" would be the  
labels of the columns and line 2 "pig" and "oink" would be the data  
for each of the columns.. all i get is an empty data grid..


on mouseUp
   set the dgText[TRUE] of group "DataGrid" to "moo" & TAB & "cow" &  
LF & \
          "pig" & TAB & "oink"
end mouseUp
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Klaus on-rev

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
Hi Sean,

> should the following not work? line 1 "moo" and "cow" would be the  
> labels of the columns and line 2 "pig" and "oink" would be the data  
> for each of the columns.. all i get is an empty data grid..
>
>
> on mouseUp
>  set the dgText[TRUE] of group "DataGrid" to "moo" & TAB & "cow" &  
> LF & \
>         "pig" & TAB & "oink"
> end mouseUp

works for me if I use CR instead of LF and if there are already at  
least two
(unlabled) columns  in the DG :-)


Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]




_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Klaus on-rev

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
Hi SEan,

Am 08.07.2009 um 10:36 schrieb [hidden email]:

> Hi Sean,
>
>> should the following not work? line 1 "moo" and "cow" would be the  
>> labels of the columns and line 2 "pig" and "oink" would be the data  
>> for each of the columns.. all i get is an empty data grid..
>>
>> on mouseUp
>> set the dgText[TRUE] of group "DataGrid" to "moo" & TAB & "cow" &  
>> LF & \
>>        "pig" & TAB & "oink"
>> end mouseUp
>
> works for me if I use CR instead of LF and if there are already at  
> least two
> (unlabled) columns  in the DG :-)

Sorry, just did a test, and this does not work here either?
Oops, the column names must be a comma separated list, but that does  
not work, too?


TREVOR! :-D


Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]




_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Trevor DeVore

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
In reply to this post by Shao Sean-2
On Jul 8, 2009, at 4:23 AM, Shao Sean wrote:

> should the following not work? line 1 "moo" and "cow" would be the  
> labels of the columns and line 2 "pig" and "oink" would be the data  
> for each of the columns.. all i get is an empty data grid..
>
>
> on mouseUp
>  set the dgText[TRUE] of group "DataGrid" to "moo" & TAB & "cow" &  
> LF & \
>         "pig" & TAB & "oink"
> end mouseUp

In the code above "moo" and "cow" would have to be the name of the  
columns. The columns would have to already exist if you are passing in  
the names. Do they?

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Bernard Devlin-2

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
I think I just posted the same question as Shao Sean on the
screensteps documentation site for the datagrid.  Apologies for that
Trevor.  Feel free to answer me here or on that site (I think I also
spotted an error in the sample data on the relevant screensteps page).

Basically my question was "is it possible to determine the the number
of columns and the names of the columns using dgText[true] without
resorting to the property inspector."

Bernard

On Wed, Jul 8, 2009 at 1:47 PM, Trevor DeVore<[hidden email]> wrote:

> On Jul 8, 2009, at 4:23 AM, Shao Sean wrote:
>
>> should the following not work? line 1 "moo" and "cow" would be the labels
>> of the columns and line 2 "pig" and "oink" would be the data for each of the
>> columns.. all i get is an empty data grid..
>>
>>
>> on mouseUp
>>  set the dgText[TRUE] of group "DataGrid" to "moo" & TAB & "cow" & LF & \
>>        "pig" & TAB & "oink"
>> end mouseUp
>
> In the code above "moo" and "cow" would have to be the name of the columns.
> The columns would have to already exist if you are passing in the names. Do
> they?
>
> Regards,
>
> --
> Trevor DeVore
> Blue Mango Learning Systems
> www.bluemangolearning.com    -    www.screensteps.com
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Klaus on-rev

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
In reply to this post by Trevor DeVore
Hi Treovor,

> On Jul 8, 2009, at 4:23 AM, Shao Sean wrote:
>
>> should the following not work? line 1 "moo" and "cow" would be the  
>> labels of the columns and line 2 "pig" and "oink" would be the data  
>> for each of the columns.. all i get is an empty data grid..
>>
>> on mouseUp
>> set the dgText[TRUE] of group "DataGrid" to "moo" & TAB & "cow" &  
>> LF & \
>>        "pig" & TAB & "oink"
>> end mouseUp
>
> In the code above "moo" and "cow" would have to be the name of the  
> columns. The columns would have to already exist if you are passing  
> in the names. Do they?

This does not work, but should, right?

on mouseUp
    put "moo,cow" into tCols
    put "moo moo" & TAB & "cow cow" & CR & "pig" & TAB & "oink" into  
tContent
    set the dgtext[true] of grp "DataGrid" to tCols & CR & tContent
end mouseUp

???

> Regards,
>
> --
> Trevor DeVore
> Blue Mango Learning Systems
> www.bluemangolearning.com    -    www.screensteps.com

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]




_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Trevor DeVore

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
On Jul 8, 2009, at 8:55 AM, [hidden email] wrote:

> This does not work, but should, right?
>
> on mouseUp
>   put "moo,cow" into tCols
>   put "moo moo" & TAB & "cow cow" & CR & "pig" & TAB & "oink" into  
> tContent
>   set the dgtext[true] of grp "DataGrid" to tCols & CR & tContent
> end mouseUp

Only if you have already defined "moo" and "cow" columns in the data  
grid. When you include column names in the dgText the data grid will  
not create them for you automatically.

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Trevor DeVore

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bernard Devlin-2
On Jul 8, 2009, at 8:51 AM, Bernard Devlin wrote:

> Basically my question was "is it possible to determine the the number
> of columns and the names of the columns using dgText[true] without
> resorting to the property inspector."

When you fetch the dgText just set pIncludeColumnNames to true the  
column names will be included on line 1.

put the dgText[true] of group "DataGrid" into theText -- line 1 has  
column names

I just noticed that this isn't included in the API docs (it was added  
in 1.0.0 build 8 which was included in gm-2) so I updated them.

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Klaus on-rev

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
In reply to this post by Trevor DeVore
Hi Trevor,

> On Jul 8, 2009, at 8:55 AM, [hidden email] wrote:
>
>> This does not work, but should, right?
>>
>> on mouseUp
>>  put "moo,cow" into tCols
>>  put "moo moo" & TAB & "cow cow" & CR & "pig" & TAB & "oink" into  
>> tContent
>>  set the dgtext[true] of grp "DataGrid" to tCols & CR & tContent
>> end mouseUp
>
> Only if you have already defined "moo" and "cow" columns in the data  
> grid. When you include column names in the dgText the data grid will  
> not create them for you automatically.

AHA! My fault, I thought one could provide the wanted column LABELS in  
the first line.

Thanks for the info!

> Regards,
>
> --
> Trevor DeVore
> Blue Mango Learning Systems
> www.bluemangolearning.com    -    www.screensteps.com

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]




_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Bernard Devlin-2

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bernard Devlin-2
Trevor, thanks for your speedy responses.

Is it possible that one could set the number & names of columns in a
future version?  Or would that just not be possible given the
motivation & design behind the DataGrid?

Bernard

On Wed, Jul 8, 2009 at 1:51 PM, Bernard Devlin<[hidden email]> wrote:

> I think I just posted the same question as Shao Sean on the
> screensteps documentation site for the datagrid.  Apologies for that
> Trevor.  Feel free to answer me here or on that site (I think I also
> spotted an error in the sample data on the relevant screensteps page).
>
> Basically my question was "is it possible to determine the the number
> of columns and the names of the columns using dgText[true] without
> resorting to the property inspector."
>
> Bernard
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Trevor DeVore

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
On Jul 8, 2009, at 9:26 AM, Bernard Devlin wrote:

> Trevor, thanks for your speedy responses.
>
> Is it possible that one could set the number & names of columns in a
> future version?  Or would that just not be possible given the
> motivation & design behind the DataGrid?

You should use the dgProps["columns"] property to do that.

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Bernard Devlin-2

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
Marvellous.  Can the DataGrid poach eggs? ;-)

On Wed, Jul 8, 2009 at 2:33 PM, Trevor DeVore<[hidden email]> wrote:
> On Jul 8, 2009, at 9:26 AM, Bernard Devlin wrote:
>
>> Trevor, thanks for your speedy responses.
>>
>> Is it possible that one could set the number & names of columns in a
>> future version?  Or would that just not be possible given the
>> motivation & design behind the DataGrid?
>
> You should use the dgProps["columns"] property to do that.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Trevor DeVore

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
On Jul 8, 2009, at 9:49 AM, Bernard Devlin wrote:

> Marvellous.  Can the DataGrid poach eggs? ;-)

Metaphorically speaking, yes.

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Alex Shaw

OSX drag & drop rev application?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Trevor DeVore
Hi

No problems getting the global variable $1 working on a runrev windows
standalone to determine what data file was dropped on the application or
double-clicked to launch the standalone but how do you do this on OSX?

Discovered if the data file is really a renamed stack set to be opened
by the osx compiled rev standalone then that works ok (stack just runs
and no need for $1) but what if you do not want to use a rev stack file
for your data file container or want to activate the rev app by dropping
a data file onto the standalone application icon sitting on your dock?

regards
alex
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
J. Landman Gay

Re: OSX drag & drop rev application?

Reply Threaded More More options
Print post
Permalink
Alex Shaw wrote:

> Hi
>
> No problems getting the global variable $1 working on a runrev windows
> standalone to determine what data file was dropped on the application or
> double-clicked to launch the standalone but how do you do this on OSX?
>
> Discovered if the data file is really a renamed stack set to be opened
> by the osx compiled rev standalone then that works ok (stack just runs
> and no need for $1) but what if you do not want to use a rev stack file
> for your data file container or want to activate the rev app by dropping
> a data file onto the standalone application icon sitting on your dock?

Use an AppleEvent handler for Macs:

on appleEvent pClass, pID
   if pClass is "aevt" and pID is "odoc" then
     -- the file path is in the appleEvent data
     request appleEvent data
     put it into tFilePath
     -- open the file here
   else
     pass appleEvent
   end if
end appleEvent

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Shao Sean-2

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
In reply to this post by Shao Sean-2
> You should use the dgProps["columns"] property to do that.

Not too certain about others, but why does the data grid not  
automatically do it?
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Trevor DeVore

Re: dataGrid - set the dgData[TRUE] to tText

Reply Threaded More More options
Print post
Permalink
On Jul 8, 2009, at 4:08 PM, Shao Sean wrote:

>> You should use the dgProps["columns"] property to do that.
>
> Not too certain about others, but why does the data grid not  
> automatically do it?

The scenario that came to mind when I was deciding whether or not to  
automatically create columns when passing in headers as the first key:

Application has a table and allows user to select a text file to  
import. The text file has some additional columns besides those being  
defined in the table. As a developer do you want those extra columns  
to automatically be displayed in the table?

Maybe, maybe not. It is simple enough to create the columns yourself  
if you do and this way there are no unintended consequences in your  
shipping application.

It is true that setting the dgText without providing column headers  
will create columns for you but really that was only done so that a  
developer using a table for the first time could enter some data in  
the property inspector and see it appear in the data grid.

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Alex Shaw

Re: OSX drag & drop rev application?

Reply Threaded More More options
Print post
Permalink
In reply to this post by J. Landman Gay
Thanks Jacqueline!

That and setting values for the standalone OSX settings: Document Type &
Document Extension, solved things.

kind regards
alex


J. Landman Gay wrote:

> Alex Shaw wrote:
>> Hi
>>
>> No problems getting the global variable $1 working on a runrev windows
>> standalone to determine what data file was dropped on the application
>> or double-clicked to launch the standalone but how do you do this on OSX?
>>
>> Discovered if the data file is really a renamed stack set to be opened
>> by the osx compiled rev standalone then that works ok (stack just runs
>> and no need for $1) but what if you do not want to use a rev stack
>> file for your data file container or want to activate the rev app by
>> dropping a data file onto the standalone application icon sitting on
>> your dock?
>
> Use an AppleEvent handler for Macs:
>
> on appleEvent pClass, pID
>   if pClass is "aevt" and pID is "odoc" then
>     -- the file path is in the appleEvent data
>     request appleEvent data
>     put it into tFilePath
>     -- open the file here
>   else
>     pass appleEvent
>   end if
> end appleEvent
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution