Re: Bind WOString to WOActiveImage binding
Re: Bind WOString to WOActiveImage binding
- Subject: Re: Bind WOString to WOActiveImage binding
- From: "Jerry W. Walker" <email@hidden>
- Date: Mon, 12 Jun 2006 19:11:29 -0400
Hi, Marcos,
What you described is not supported in WebObjects as shown. You're
displaying a .wod file and WebObjects only parses the <webobject
name=x> syntax in the .html file to relate it to the bindings in
the .wod file.
However, I can't see a good reason for doing what you're trying to do
here anyway, since WO provides several facilities for referencing the
name of the file holding the image data for a WOActiveImage.
By providing a quoted string to the "filename" binding, you can
specify the file name as a constant. WO will then use the resource
manager to find any file known to the project with that name. You
don't have to specify a directory. You just have to be sure that the
file is known to the project by adding it.
If you provide a key name (an unquoted value) to the "filename"
binding, the key will be used to look for a method or ivar with that
name in your WOComponent's class file. You can provide as much
intelligence as you desire in a method so named to create the name of
the file if it's referenced in this way.
The "data" binding goes much further than that, if you can't add the
file to the project before run time. Using the "data" binding, you
can find the file containing the image data any way you want, read
the contents of the file and simply provide it directly as an NSData
object.
HTH.
Regards,
Jerry
On Jun 12, 2006, at 6:20 PM, Marcos Trejo Munguia wrote:
Hi List:
I've been thinking if it is possible to bind a WOString to a
WOActiveImage filename binding for example, something like this:
String1: WOString {
value = "Bullet.jpg";
}
ActiveImage1: WOActiveImage {
filename = <WEBOBJECT NAME=String1></WEBOBJECT>;
framework = "app";
action = cancel;
}
Thanks in advanced! _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden