• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Binding EOF Fecth Qualifier in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding EOF Fecth Qualifier in IB


  • Subject: Re: Binding EOF Fecth Qualifier in IB
  • From: Ryu <email@hidden>
  • Date: Thu, 17 Feb 2005 15:18:06 +0100

Title: Re: Binding EOF Fecth Qualifier in IB


Thx for your reply.

Coding it was already quite clear for me. As I’d like to avoid coding for such a simple thing,
I’d like to do it with “click only” under Interface Builder. Docs says it is possible, but I can’t find how.

I was already able to make a “load all rows and display”, “filter rows in memory” and
“add/delete rows” using click only with Interface Builder

My pb is to execute a sql request, with bound variables to graphical elements, using Interface Builder, avoiding coding.
Up to now, I got that I have to create a Fetch Spec with Qualifier, but I don’t get how to “bind” the qualifier variables to
graphical elements (NSText/NSForm) under Interface Builder (like I do in the Inspector in the connection section, EOTextAssociation,
Ctrl-Drag to the EODisplayGroup, and connect to the wanted field). I don’t have the @bingings->field or @queryBindings->fields they talk about in the docs.

Here: http://developer.apple.com/documentation/WebObjects/UsingEOModeler/8WorkingW
ithFetchSpecifications/chapter_8_section_2.html

In figure 7-4, you can see that you can do graphically what I want with WebObjects Builder. They say you can do it with Interface builder,
But how ?

Thx in advance!

    Ryu


On 17/02/05 13:30, "email@hidden" <email@hidden> wrote:

use this
-------------------------------------------------------
NSMutableDictionary bindings = new NSMutableDictionary();
bindings.setObjectForKey(variable value,fetch variable);

EOEditingContext ec =
new EOEditingContext();

-------------------------------------------------------



public NSArray fetchArray(String fetch, String entity, NSMutableDictionary bindings, EOEditingContext ec)

{

EOFetchSpecification fs = EOFetchSpecification.fetchSpecificationNamed(fetch, entity);

if (bindings != null)

{

fs = fs.fetchSpecificationWithQualifierBindings(bindings);

}

NSArray objects = ec.objectsWithFetchSpecification(fs);

if (objects.count() > 0)

{

return objects;

}

else

{

return null;

}

}

-------------------------------------------------------
or this
public EOGenericRecord fetchRow(String fetch, String entity, NSMutableDictionary bindings, EOEditingContext ec)

{

EOFetchSpecification fs = EOFetchSpecification.fetchSpecificationNamed(fetch, entity);

fs = fs.fetchSpecificationWithQualifierBindings(bindings);

NSArray objects = ec.objectsWithFetchSpecification(fs);

// return (EOGenericRecord) objects.objectAtIndex(0);

if
(objects.count() > 0)

{

return
(EOGenericRecord) objects.objectAtIndex(0);

}

else

{

return
null;

}

}

-------------------------------------------------------

----- Original Message -----
From: "Ryu" <email@hidden>
To: <email@hidden>
Sent: Thursday, February 17, 2005 1:15 PM
Subject: Binding EOF Fecth Qualifier in IB




Hi there,

I'm an old NeXT developer, getting back into OSX. My question
may sound easy, but I couldn't find "how to" on the web, so here I post.

I'm writing a Obj-C/Cocoa application that uses EOF (No lines of code up to
now so Obj-C doesn't matter)

Here is what I want to do: a search form in a database (containing millions
of entries, so I can't select all, then search in memeory) using
Appkit/Interface Builder. The database was designed using EOF/EOModeler.
I have added a Fetch Specification to may table, with a Qualifier:

    name = $name

Once under IB, I just can't find how to link some NSTextField or NSForm to
the Qualifier Variable.

Though, Apple doc says

http://developer.apple.com/documentation/WebObjects/UsingEOModeler/8WorkingW
ithFetchSpecifications/chapter_8_section_2.html

" You do this by dragging a fetch specification into either WebObjects
Builder or Interface Builder and then binding user interface elements to
keys in the display group that correspond to the fetch specification’s
variables "

"In Interface Builder, the steps are similar except that you bind the user
interface elements to @bindings.title, @bindings.date, and
@bindings.studioName keys of your display group. The @bindings syntax
represents the value associated with the named qualifier variable"

I got a new EODisplayGroup object configured with my Fecth Spec, but
I can't find anything related to @bindings or (@querybindings) in the
inspector of my NSFormCell inspector
(connections/EOTextAssociation/EOPickTextAssociation), nor in the inspector
of my EODisplayGroup.

Last thing: I understand how to make it programmatically, but I want to
do it under IB

I think it should be as easy as a 2 click operation (like browsing all
entries and adding new entries in DB), but couldn't find how to! Plz help!

Regards,
    
    Ryu





 _______________________________________________
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


 _______________________________________________
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

  • Follow-Ups:
    • Determining if an image exists
      • From: David Griffith <email@hidden>
References: 
 >Re: Binding EOF Fecth Qualifier in IB (From: email@hidden)

  • Prev by Date: Re: attempt to assign value to unknown key
  • Next by Date: Determining if an image exists
  • Previous by thread: Re: Binding EOF Fecth Qualifier in IB
  • Next by thread: Determining if an image exists
  • Index(es):
    • Date
    • Thread