Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class / Field parsing error?? #22

Closed
mgalloy opened this issue Oct 22, 2012 · 5 comments
Closed

Class / Field parsing error?? #22

mgalloy opened this issue Oct 22, 2012 · 5 comments

Comments

@mgalloy
Copy link
Owner

mgalloy commented Oct 22, 2012

The following code:


;+
;  uses utility_compile,multi_element_compile
;-

@time_series_data_model
@analysis_cache
@analysis_cache_support
@star_eti_analysis_subject
@processing_module_link

;+
;  Description: Handles user window selection and starts up the
;  multi_element_image_canvas window
;
;  @author: Chris Widdis
;  @field image_parent_widget An object containing the main base
;   widget
;  @field button_panel_id The widget id of the button panel
;  @field data_model_obj The data model object
;  @field data_nav_handle Handle of the data navigation settings.
;   Data navigation is not implemented, but would be simple to do so
;  @field multi_element_image_canvas Object reference to the
;   multi_element_image_canvas
;  @field analysis_cache_handle Handle of the cache where the requests
;   are stored when suspend analysis is pressed
;  @field display_output_handle Handle to the file output structure
;  @field caller_handle Handle of the one responsible for cleaning up
;   the analysis window
;  @field notify_procedure string of the function used to notify the
;   caller_handle it has closed.  It has the form:
;   pro notify_procedure, caller_handle
;-
PRO multi_element_analysis_window_settings__define
  struct = { multi_element_analysis_window_settings, $
             image_parent_widget:obj_new(), $
             button_panel_id:0L, $
             data_model_obj:obj_new(), $ 
             data_nav_handle:0L, $
             multi_element_image_canvas:obj_new(), $
             analysis_cache_handle:0L, $
             display_output_handle:0L, $
             caller_handle:0L, $
             notify_procedure: "" }
END

results in the following errors:

 Parsing multi_element_analysis_window.pro...
IDLDOC: cannot construct definition for class multi_element_analysis_window_settings
IDLDOC: invalid field image_parent_widget
IDLDOC: invalid field button_panel_id
IDLDOC: invalid field data_model_obj
IDLDOC: invalid field data_nav_handle
IDLDOC: invalid field multi_element_image_canvas
IDLDOC: invalid field analysis_cache_handle
IDLDOC: invalid field display_output_handle
IDLDOC: invalid field caller_handle
IDLDOC: invalid field notify_procedure
  Parsing multi_element_analysis_window_constants.pro...
@ghost ghost assigned mgalloy Oct 22, 2012
@mgalloy mgalloy closed this as completed Oct 22, 2012
@mgalloy
Copy link
Owner Author

mgalloy commented Oct 22, 2012

Author: jhood
I did some testing to try and learn more about this. If I have a number of similar structure definitions in a file the 2nd and on procedures (name2!__define, etc.) are converted to class definitions and the @field lines are parsed without error, and show correctly in the IDLDoc output.

I noted that your source code tends to put the name!__define procedure near the end of the file. Maybe this is a clue to the difference?

Note as well that these filenames don't end in !__define though you seem to have removed this restriction from your parsing of structure/class definitions.

@mgalloy
Copy link
Owner Author

mgalloy commented Oct 22, 2012

There is some oddities with the class handling. The filename shouldn't have to end in __define, but I don't think I have any tests where it doesn't right now.

Normally, I only have one class per file and to make the classes found automatically, I put the __define routine as the last routine in a file with the same name. There are a few examples of multiple classes in a single file, though (MGffTemplate has a few helper classes in the same file that it is defined in).

@mgalloy
Copy link
Owner Author

mgalloy commented Oct 22, 2012

See r436 for some changes that might affect this ticket.

@mgalloy
Copy link
Owner Author

mgalloy commented Oct 22, 2012

Changeset r439 should fix this. I also added a test regression/nonautoclasses/ for this case.

@mgalloy
Copy link
Owner Author

mgalloy commented Oct 22, 2012

Author: anonymous
Most of my errors have gone away. I would also consider this issue closed. I will investigate remaining errors and repair my markup or open a new ticket if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant