• 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: Object within CD Document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object within CD Document


  • Subject: Re: Object within CD Document
  • From: "I. Savant" <email@hidden>
  • Date: Sun, 23 Apr 2006 11:56:04 -0400


I agree with this approach - define a "TextBox" entity with whatever properties you want (including its size / position on your "layout") in your model, then you can store / retrieve this "description" of a text box. You can recreate the NSTextField or NSTextView when the document is loaded (or whenever) based on the parameters if the TextBox instance or store its new parameters in the database when they change.


You may want to read the Core Data Programming Guide to get a better understanding of these concepts. Also reading up on an intro to relational databases would be a great help as it seems you're having trouble conceptualizing the abstraction of objects as "entities" (not that I'm an expert myself, but my DBA skills have definitely helped me understand Core Data and use it well from the very beginning).

The bottom line is that you certainly *can* "represent" a text field in a core data (or any) database/store, just like you can represent pretty much *anything*, but you just can't "store a text field in the database" directly, so to speak, especially not by inserting your own home-brewed XML into a stock Core Data store.

  Hope this helps.

--
I.S.


On Apr 22, 2006, at 8:30 PM, Andres wrote:

Is there a way that I can put a textbox within a core data document. The xml
markup for the object would be:


<TSTextfield name="somename" maxinput="128"/>



I guess that what you want for that is not a "textbox" in a core data document but an entity in the object model that represents a textbox. That entity will have a property named maxinput of type integer and another property "name" of type String.

Hope this helps.

Andrés

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Object within CD Document (From: "Rick Langschultz" <email@hidden>)
 >Re: Object within CD Document (From: Andres <email@hidden>)

  • Prev by Date: Re: Trying to read PICT data using Quartz functions
  • Next by Date: Re: Core Data / NSTableView Binding
  • Previous by thread: Re: Object within CD Document
  • Next by thread: Re: Object within CD Document
  • Index(es):
    • Date
    • Thread