[Xerte] drawing stuff with code

Julian Tenney Julian.Tenney at nottingham.ac.uk
Mon Feb 15 16:01:07 GMT 2010


It's very hacky, but any script in {} on the properties of the icon is
evaluated. You could maybe addDraw(myParent), then you only have one
icon in the page, and the draw is added to the page itself?

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Monday, February 15, 2010 3:59 PM
To: Xerte list
Subject: RE: [Xerte] drawing stuff with code



Trying to combine the text object that will be drawn on and the script
that calls the function to do the drawing.

There have been a few cases of objects doing things unexpectedly (Wasn't
a script attached directly to an interaction one of them?).
And from my mistakes in writing rlo's directly, some funny things have
happened.
Sort of like undocumented calls.

I'm trying to have a single icon I can drop on the flow line that will
contain both the drawn object and the code that will call the draw.

I doubt it possible, as SCR is probably the only one that calls the
interpreter, but I thought I'd ask.

----------------------------------------
> Subject: RE: [Xerte] drawing stuff with code
> Date: Mon, 15 Feb 2010 15:49:17 +0000
> From: Julian.Tenney at nottingham.ac.uk
> To: xerte at lists.nottingham.ac.uk
>
> Sorry: script('debug("hello world")', _level0.engine);
>
> The target is the object whose properties are your script variables,
> i.e. the scope for the script.
>
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian
Tenney
> Sent: Monday, February 15, 2010 3:48 PM
> To: Xerte discussion list
> Subject: RE: [Xerte] drawing stuff with code
>
> Not sure what you mean...?
>
> You can always execute script using script(string, target); where
target
> is probably _level0.engine and string is the code you want to execute:
>
> script('debug("hello world")');
>
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
Burnett
> Sent: Monday, February 15, 2010 3:45 PM
> To: Xerte list
> Subject: RE: [Xerte] drawing stuff with code
>
>
> Lovely.
>
> Any way to fake a text object into executing a script? ;-)
>
>
>
> ----------------------------------------
>> Subject: RE: [Xerte] drawing stuff with code
>> Date: Mon, 15 Feb 2010 14:46:11 +0000
>> From: Julian.Tenney at nottingham.ac.uk
>> To: xerte at lists.nottingham.ac.uk
>>
>> icon.previousSibling.clip()
>>
>> -----Original Message-----
>> From: xerte-bounces at lists.nottingham.ac.uk
>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
> Burnett
>> Sent: Monday, February 15, 2010 2:45 PM
>> To: Xerte list
>> Subject: RE: [Xerte] drawing stuff with code
>>
>>
>>
>> OK, no way to genericize this then.
>> I have to add a text icon, give it a target ID, then add the function
>> call in a script underneath.
>> No way to say "the icon above me" without explicitly having assigned
> an
>> ID?
>>
>>
>> ----------------------------------------
>>> Subject: RE: [Xerte] drawing stuff with code
>>> Date: Mon, 15 Feb 2010 14:24:18 +0000
>>> From: Julian.Tenney at nottingham.ac.uk
>>> To: xerte at lists.nottingham.ac.uk
>>>
>>> They should just do that:
>>>
>>> Add a text icon to draw into, id=myIcon
>>>
>>> SCR:
>>> myDraw = myIcon.addDraw(0,0,400,400);//adds the drawing area
>>> myDraw.freehand();
>>>
>>> //now you can draw in that region with the mouse...?
>>>
>>>
>>> -----Original Message-----
>>> From: xerte-bounces at lists.nottingham.ac.uk
>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>> Burnett
>>> Sent: Monday, February 15, 2010 2:22 PM
>>> To: Xerte list
>>> Subject: [Xerte] drawing stuff with code
>>>
>>>
>>>
>>> The drawing editor and I don't get along, so I'm trying to set up a
>> draw
>>> function I can call with parameters.
>>>
>>> What is the best way to handle creating code-drawn objects so they
>> erase
>>> on page changes and I can target them for erase()?
>>>
>>> Cheers,
>>>
>>> Dave
>>>
>>> _________________________________________________________________
>>> Hotmail: Trusted email with Microsoft's powerful SPAM protection.
>>>
>>
>
http://clk.atdmt.com/GBL/go/201469226/direct/01/________________________
>>> _______________________
>>> Xerte mailing list
>>> Xerte at lists.nottingham.ac.uk
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>> _______________________________________________
>>> Xerte mailing list
>>> Xerte at lists.nottingham.ac.uk
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>
>> _________________________________________________________________
>> Hotmail: Trusted email with powerful SPAM protection.
>>
>
http://clk.atdmt.com/GBL/go/201469227/direct/01/________________________
>> _______________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>> _______________________________________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> _________________________________________________________________
> Hotmail: Trusted email with Microsoft's powerful SPAM protection.
>
http://clk.atdmt.com/GBL/go/201469226/direct/01/________________________
> _______________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/201469226/direct/01/________________________
_______________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte


More information about the Xerte mailing list