Is there a way (or tool) to allow for the editing of the whole of a class, methods, properties etc. all on one screen. I am doing some porting and find it very slow to have to create a method->code->create a method->code…
I’m sorry but I am not quite following you…
You want a single “windows” that you can edit all the methods at once of a class, instead of editing each one, one by one. Correct?
Sorry…
Yes - dare I say it and not wanting to upset, but just like most other code editors, Visual Studio for example or even TextMate. Where I can see and code many methods and properties in a single document for a whole class.
There’s no way to do this currently, but I wish there was. Creating methods and properties was faster and smoother in RS2012, and there are a number of Feedback requests to try and restore that fluidity to Xojo. But even in RS2012 I wish we could have seen the code for a project item as raw text in a single window.
That would not only make some work easier, but would open up tremendous opportunities for automation.
If you want this, throw your weight behind <https://xojo.com/issue/7173>
save as Xojo Project and modify the text file in the text editor of your choice
Unfortunately that’s not a very “clean” format or convenient way to work. It is an option though.
Hi Daniel,
Weight duly thrown! Thanks
Antonio - I may give that a try, I will obviously lose any language support such as code completion and syntax checking so it is far from ideal but has to be better than:
create a thing->code->create a thing->code for hundreds of methods, properties and consts.
To be honest I was expecting to get a reply from someone saying that all I need to do is click somewhere to see the whole file and for me to feel a bit embarrassed that I didn’t spot the option myself - it is such an obvious thing to use if you are coming from other languages and IDEs.
There is no way to do this in the IDE, but you can copy a class and paste it in an editor like sublimetext. Theoretically you should be able to paste it back when done.
This worked more reliably in older versions, in the IDE it’s still hit and miss.
For example, this is a copied event from the ide:
Function ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) As Boolean
dim rows() as integer
me.selRow=me.RowFromXY(x,y)
clickedRow = me.selRow
me.selColumn=me.ColumnFromXY(x,y)
rows.Append me.selRow
if me.selected(me.selRow) = true then
for i as integer = 0 to me.ListCount-1
if me.selected(i) and i <> me.selRow then rows.Append i
next
end if
Z_CMM_ResultList(base,rows)
End Function
LOL! I can’t copy in RS2012, and can’t paste back in Xojo :-/
What do you mean? I can but, as I said, it’s sporadic and needs to be fixed in several places. Probably due to focus detection problems.
No, that is not the Xojo Way.
Directly editing the Xojo Project text files is probably your best bet.
Well I guess we will wait and see - it is #6 on the feedback list so maybe one day. Will try the project text idea over the weekend.
If I select and copy a class, method, property, etc. in RS2012r2.1 there’s no text on the clipboard for a text editor.
If I copy out of Xojo I get clean code for a text editor, but if I try to paste back in, nothing happens.
If I copy out of Xojo, I can paste back into RS2012.
[quote=12316:@Paul Lefebvre]No, that is not the Xojo Way.
Directly editing the Xojo Project text files is probably your best bet.[/quote]
I sincerely hope you guys reconsider. Aside from accommodating people who prefer to work that way, you would open the door for all kinds of automation tools. Note that this doesn’t have to and shouldn’t be the default way of working, just an optional view on a project item.
Normally I prefer the GUI approach that Xojo takes. But there are times when I need to bulk load or process properties and functions. Right now that’s difficult in Xojo as it requires save out, parsing the file(s), and reloading.
Is there a formal schema available for the XML version of a project?
No.
Theoretically you should be able to paste it back when done.
I created an app that created classes and inserted the necessary code. It works.
There used to be some documentation on the XML format, but I don’t know if it’s still available. It’s worth noting, however, that the XML format is not The Future. The text format is going to become the one true format.
If you want to see this happen, I’d encourage you to go into Feedback and add it to your “Top Cases” section.
I’ve just started with Xojo and agree this is essential. Couldn’t imagine developing with VS2012 in a single method view!
How does the feedback:// url work? Must this be clicked via the Xojo program?