Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string to number



Hi Hal and all,

Sorry about that!!

The composition is attached.

The RSS feed consists of numbers from the sensors (the data they're getting) being automatically written to a .rss.  Quartz then finds this RSS file via my Java webserver on my local machine and looks for the new file every second.  Then displays this number.  What I want to do is ask quartz to see IF that number is uder a specified threshold,say 1000, to then give a true statement, which will allow another patch to operate - in my case, get video from a file.  However, the issue is that when the data comes from the RSS patch, it's a string.  I need it to be a number to perform the numerical tasks I had in mind - i.e conditional patch.

I tried the _javascript_ and doing parseInt: outputs[0] = parseInt(inputs[0]);
But it doesn't even transmit my value to the _javascript_ patch input.  In ust get

I did try having all the types of thepatches set to virtual - meant to transmit any type of value, but obviously not to interface between 2 different types. 

I'm thinking of implementing a java solution - i.e. the file only writes in java when the value id under 1000, but I'm disappointed in Quartz that it can't perform this simple programmatic function.  Or can it??  Is there an easy way to do this that I've completely missed?

Do you need more info?

Regards and thanks from,

Jacqui











On 7/23/07, Hal Mueller < email@hidden> wrote:
Post your code.  What result did it produce, and how does that differ
from what you expected and from what you need?  The information in
your question doesn't leave room for much of anything besides
guesswork.

H




Attachment: RSScompare1.qtz
Description: QuickTime movie

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden

References: 
 >string to number (From: "jacqui galvin" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.