How can I extend a custom class ussing Architect? - sencha-touch-2

I'm using Sencha Architect. I have already created a base class called MyApp.view.MyMenu that extends Ext.Menu.
How can I create a second class called: MyApp.view.MySecondMenu that extends MyApp.view.MyMenu. I cannot seem to be able to change the extend property!
Thank you!
PS: I'm using Architect v3.0.4.1386.

I found a solution:
In the Toolbox search for Class.
Drag the Class into the Project Inspector
Now you are able to modify the extend property :)

This is a problem in architect I really hate.
You have to add a custom class (you can do via the + in the corner of project Inspector) and there you can set the "extend property" to what you want.
The big disadvantage is that you don't have your properties in the inspector so you have to add every property you need as a custom one.
It's a kind of ugly workaround but the generated code is alright, hopefully they will better this one day.

Related

Intellisense - deduce right Class by its methods

I'm used to work with NetBeans and now I'm trying IntelliJ. So my question is: Does IntelliJ has a way to get right class by its methods?
For example, in NetBeans if I write:
glGenBu // Intellisense will kick in and will suggest me
to use GL15.glGenBuffers() method from GL15 class
This will automatically import the right library.
This is very handy because I'm working with LWJGL and it has a bad way to manage OpenGL methods ('GLXX' where XX is the version of OpenGL and all methods that appeared in that version are stored in that class) and I never remember the right class where my desired method is.
Thank you.
Pressing Ctrl+Space when you already see completion list will show more suggestions, with static methods from the entire project among them. See https://www.jetbrains.com/help/idea/auto-completing-code.html for more details.

How can I override an Objective-C Cordova class without hacking the source?

I am new to Objective-C so sorry if this is inanely simple. I am trying to alter the PhoneGap Capture Feature to add some text on the audio and video capture screens that pop up when you call capture.captureAudio and capture.captureVideo.
I have found I can alter the Cordova source and change the loadView method of the CDVAudioRecorderViewController to add a text field and alter the appearance. Likewise I imagine I should be able to do the same with the CDVImagePicker class.
I know hacking the source of a library is a bad idea so I am wondering what are the other simple ways I could go about doing this?
Is there a sneaky simple way to substitute an inherited class in Objective-C? Perhaps by changing a factory (init) method somehow? If so, how do I set this up within my own codebase so that it will use my changes ahead of the original code?
If not does that mean I have to resort to creating a plugin that overrides CDVCapture find every method that mentions the classes I want to sub out and replace them with my new class that inherits form CDVAudioRecorderViewController just to override a single method on CDVAudioRecorderViewController?

Pharo/Squeak - How do I quickly browse the implementation of a given method in a given class?

Let's say I want to see how "copy" is implemented in the Dictionary class. Currently I use the system browser and manually traverse the inheritance hierarchy (bottom up) until I find the class that implements the given message. Is there a one-liner for the workspace, that would open the system browser at the right location?
( SomeClass whichClassIncludesSelector: #initialize ) browse
That will browse the class that implements the message #initialize.
Personally, I just type the #selector in a workspace, highlight it, and hit alt+m to pull up all implementors of the message. Much faster than typing all that code.
(SomeClass>>#someSelector) browse
works as well in my Pharo image.
works as well in my Pharo image.
And since you want to find a class first, you can combine it with previous example..
((SomeSubclass whichClassIncludesSelector: #someSelector)>>#someSelector) browse
to directly go to given method.
If you are using OmniBrowser, you can use the contextual menu Implementors in Hierarchy... to only browse the implementors of a selector in the hierarchy of the Dictionary.
OmniBrowser also provides an Inheritance Browser. Select any implementation of #copy and click on the Inheritance button in the toolbar. It will show you a hierarchical view of all implementors of #copy.

How to create an Objective C class/framework for re-use in the team

I have a class (that inherits from a base class) and also has image assets for some UI elements. I would like to be able to wrap this up images and all, into a single file that can easily be added to future projects by myself and other members of the dev team. Is there a way to do this? Adding a documentation file, a la Apple's own that responds to cmd click within XCode would be the icing on the cake.
Cheers
Dave
You create a static library... see the following Tutorial

Xwiki Create virtual wiki - problem adding a class

I'm trying to create a virtual wiki but I already struggle with
In your Class Editor, create a new class called "XWikiServerClass"
Further reading in the DevGuide / DataModel shows that I'm not alone. I understand the words saying but I don't get the how-to as there is no option in the class-editior of creating new classes. Navigating to class editor shows an info box
No class is defined in this wiki document. You can create one by adding properties from the panel on your right, or you can choose another class to edit from the list below.
Ok, I added 'XWikiServerClass' and would have expected to be able to add a type class but that's not possible. I've tried a few properties but nothing shows up as a class in class editor.
Can you give more info on how you set up your wiki ?
As far as I know, you should have installed xwiki-enterprise-manager-web-x.y.war and modify your setup to fit your needs.
Second, you should have imported "xwiki-enterprise-manager-wiki-administrator-x.y.xar into your empty instance.
This xar archive already contains the XWikiServerClass and a very handy set of pages to automate the creation of virtual wikis.