Vvidget Code Reference Manual

Vvidget Code > API > Mac OS X > Embedded > Dictionary Parser

The Dictionary Parser is defined by the VvidgetCodeDictionaryParser class. An instance of that class is used to aid in the construction of a Dictionary which defines a graph.


Linkage

Add the Dictionary Parser functionality to your project by adding all the headers in /Library/Vvidget/macosx/include to your project and one of the frameworks referenced below.

Definition:/Library/Vvidget/macosx/include/VvidgetCodeDictionaryParser.h
Shared Frameworks:/Library/Frameworks/Vvidget_*.framework
Embedded Frameworks:/Library/Vvidget/EmbeddedFrameworks/Vvidget_*.framework

If you use the Embedded Frameworks then you will need to add a build copy phase to your project to copy the Vvidget Frameworks into your application bundle. See Deploy for details.


Method Definitions

The following defines each method that is used with an object (instance) of the VvidgetCodeDictionaryParser type.

- (id)init

You will need to make at least one dictionary parser for your application. The following makes a dictionary parser:

VvidgetCodeDictionaryParser *parser;
parser = [[VvidgetCodeDictionaryParser alloc] init];

The newly constructed object is assigned to the symbol parser and that is the symbol you refer to in subsequent calling code.

- (void)VC_associate_with_view:(id)the_view

The parser translates a dictionary state to an object graph whose root is an element of the_view. This method associates this parser with the_view. the_view is an instance of class VvidgetCodeView. See View.

[parser VC_associate_with_view:my_view];

- (void)VC_associate_with_event_qualifer:(id)the_event_qualifier

This method associates this parser with the_event_qualifier. the_event_qualifier is an instance of class VvidgetCodeEventQualifer or subclass. See Event Qualifiers.

[parser VC_associate_with_view:my_view];

- (void)VC_update_using_dictionary_constructor:(VvidgetCodeDictionaryConstructor *)the_constructor

This method parses the_constructor to the view associated with the receiver. Once this method is called the dictionary state is mapped to a "live" object graph state and the view is ready for display and other interactions.

[parser VC_associate_with_view:my_view];

Before using this method you must have associated the receiver with a view and event qualifier.

- (void)dealloc

This method deallocates the parser.


Actual Use

The following is a complete calling sequence of a dictionary parser and makes graphical representation of constructor in graph_view.

parser = [[VvidgetCodeDictionaryParser alloc] init];

/* graph_view is typically an outlet set in a nib file. */

[parser VC_associate_with_view:graph_view];

/* ... Load the constructor here ... */

[parser VC_update_using_dictionary_constructor:constructor];

The parser associates a Dictionary Constructor with a Vvidget Code View object and causes the association to synchronize using the VC_update_using_dictionary_constructor method. Consult the Dictionary Constructor and View sections for the associated features.

Please help improve this documentation. If a section is hard to understand, there is a typo, you would like a new section added, or you detect any other improvement that can be made then please email support@vvi.com with your information.




© Copyright 1993-2011 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.