Are macs "idea" for programming


Recommended Posts

Out of curiosity, what features of Mac OS X cannot be accessed by AppleScript that Windows has that can be accessed by WSH?

WSH allows access to anything in WinAPI. You can send events to anything you can see, but it's nowhere near as nice for automating workflows as applescript. It's not pretty, but it's possible to write a program like VLC using some (ungodly complicated) WSH scripting.

Scripting an application without an applescript dictionary is a royal pain. Try scripting Dreamweaver if you really want an example. Writting something like VLC with applescript would be painful if it's possible at all. I suppose you could always fall back on using the AppleScript Studio and Cocoa but then you're no further ahead than you are with Windows: all of the like-English syntax starts getting in the way. Using core audio (and other low-level services) directly with applescript may be impossible, I've never seen anybody pull it off, and I've been trying to do it for a while just to see if it's possible, not necessarily because it's practical. If you've got a tutorial or example, I'd love to see it. That said, you can't really hold that against AS because it was never intended for that sort of low-level work anyway.

Different markets, different focus.

Wasn't the graphics in 10.3 done with Quartz?

Last I checked, Quartz was defined as a "vector-based 2D drawing library"

Not exactly, for one thing - it's not a library. Library means something very specific and it's not quartz. Quartz is much more complex than a simple library like vimage or blas.

See the Mac OS X Technology overview, Chapter 3 (p40).

Quartz is at the heart of the Mac OS X graphics and windowing environment. It provides rendering support for 2D shapes and text and combines a rich imaging model with on-the-fly rendering, compositing, and anti-aliasing of content?blah blah blah, compositer, blah blah blah, window server, blah blah blah API.

More specific technical documentation is included with the xcode developer reference library: feel free to download it and read till your eyes bleed.

but I think that it works in vectors and then outputs it to bitmaps to be displayed, so it more or less is still using vectors on a low level.

585757515[/snapback]

Quartz has a metric butt-load of vector drawing capabilities but Aqua is done almost exclusively with bitmaps. Buttons, icons, all that tacky brushed metal stuff, window widgets, scroll bars, etc.

are stored as simple images in extras.rsrc and localized.rsrc IIRC. Don't hold me to those specific file names, I've never been one to screw around with system files when steve jobs says not to, and I'm on a PC and couldn't check to make sure even if I wanted to.

-------

In both of those you can just drag and drop UI features from the toolbox to the form and position/modify them however you want without ever looking at the code.

Sure you can, and you'll have a nice picture of a user interface.

The one I posted actually worked, I used it to post in this thread.

And writing event-handling code is insanely easy.

The argument I responded to was "Tell me, how do you do the same in that little code, and with that ease in Cocoa?"

I showed him that I could do a fully functional web browser (not a firefox competitor, but it did have enough UI to actually get on the web and post on this forum) without any code. Not only did I not have to write code myself, but my IDE doesn't generate any either.

So now I have to ask what's your point? By definition, not writing code is infinitely easier than writing 1 line of code. Have you found a way to use VS.Net to create the same functionality without writing ANY code? If so then I encourage you to go and do it, and get back to us.

As for seperating the UI from the code completely, that's the point of Avalon and XAML. There are already some great tools for working with XAML interfaces and the Avalon CTP. I'm sure when it's released you'll see a plethora of excellent tools for that.

Me too, let's talk about that when it's released and those tools exist, okay?

Link to comment
Share on other sites

Macssuck, this is just a little off topic, but how the crap do you know all this stuff? You're a bloody Mac info God.

Link to comment
Share on other sites

First I thought “Wow, that's not very much of a challenge.” But then I thought “what good is just a browser display on a form?” So I started adding things:
  • Back/Foward history (the "<" and ">" buttons)
  • Reload page button ("R" button)
  • Stop loading button ("S" button)
  • Text-size control ("+" and "-" buttons)
  • An Address bar (so you can actually use it to go places
  • Printing ("P") button.
  • Faxing
  • Inline spell checking
  • iPhoto integration (copy pages into iPhoto library for when you're viewing photos)
  • Google Integration (right click any selected word to search in google)
  • Dictionary Lookup (right click any word to find definition in OED)
  • Text-to-speech synthesis, so you don't have to actually read the page
  • Full clip-board support
  • Full drag/drop support

So I made all that, and you know what? It took me no lines of code, as in zero, none, notta, nil.

Then I used that browser to make this post.

EDIT:

Here's a screenshot, just in case you're curious.

585751570[/snapback]

So basically, what your trying to say is you didn't program s**t, you just dragged and dropped some controls on to a form (I assume that is how this XCode thing is used). Would you mind pasting the IDE generated code for that browse please?

Link to comment
Share on other sites

So basically, what your trying to say is you didn't program s**t, you just dragged and dropped some controls on to a form (I assume that is how this XCode thing is used).

Exactly.

Would you mind pasting the IDE generated code for that browse please?

585757726[/snapback]

All of the code for that project was already posted: the IDE doesn't generate code to create the user interface, this is already explained earlier in the thread.

Link to comment
Share on other sites

I was referring to AppleScript as a simple scripting language that comes with OSX, WSH is the nearest comparable Windows feature.

Out of curiosity, what features of Mac OS X cannot be accessed by AppleScript that Windows has that can be accessed by WSH?

585757515[/snapback]

Why are you even comparing AS and VBS? I was talking about rapid application development with VB (note lack of S) or .NET, not simple scripting. Real Basic (which was pointed out before) or Java would probably make better comparisons.

Link to comment
Share on other sites

So basically, what your trying to say is you didn't program s**t, you just dragged and dropped some controls on to a form (I assume that is how this XCode thing is used).  Would you mind pasting the IDE generated code for that browse please?

585757726[/snapback]

Ask macssuck, explained before, the UI is stored in .nib files which are archived objects. This is not dissimilar from what Avalon and XAML will provide for Longhorn except that this technology dates back from NeXT Step in the 80's. You save the .nib files in either binary format or as text.

So are you suggesting that a developer using VS.NET is not programming sh*t when they design a UI? BTW. He used Interface builder to develop the GUI objects. There is a facility in Interface builder which allows you to test an interface "live" before saving it without having to write any code. You can use any IDE you wish (not just XCode) to build the complete project.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.