Giter VIP home page Giter VIP logo

sketch-headers's People

Contributors

abynim avatar exevil avatar savjee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketch-headers's Issues

Usage explanation

Hi, what is the correct way to use the headers from an Xcode framework project? There always seem to be missing headers. Could you please elaborate on how to use this? Many thanks

what file in the sketch.app do you run class-dump on?

In the 53 beta, there's a SketchModel framework in which class-dump finds MS* classes, but that framework doesn't exist in 52.X, and none of the other frameworks appear to contain MS*, either.

Would be great if you could include your invocation in the readme!

How to get a sketch plugin always prod ready ;) ๐Ÿš€

Hello @abynim ,

I develop a sketch plugin for my company, to help our UX team. Now with the sketch version 52, the plugin is broken because we use old headers.

Thanks for the headers update ๐Ÿ™we can fix our plugin with it.

We want to anticipate this on the next release, to prevent down time on the plugin ๐Ÿ’ช

How to do you manage to get the headers before the release ? Is there a dev newsletter ?

thank you for your answer ;)

Sketch 67 symbolMaster.createSymbolInstance API not work

when i import a library sketch file, the symbolMaster.createSymbolInstance API not work:

const document = context.document;
const symbolReferences = library.getImportableSymbolReferencesForDocument(document);
symbolReferences. forEach(ref => {
   const symbolMaster = ref.import();
   const instance = symbolMaster.createNewInstance();
})

this is work before sketch 67

Too many files in directory

When you open Headers directory on GitHub, it doesn't show all files, warning message appears:

Sorry, we had to truncate this directory to 1,000 files. 482 entries were omitted from the list.

Of course, you can clone this repo. But very handy to use it through the web.
My suggestion is to divide it to sub directories. I see that every file has own prefix AF, BC, MF and so on, maybe classify them by prefix.

textBehaviourLabelString in version 61

Hello @abynim ๐Ÿ‘‹, I build a plugin where I use textBehaviourLabelString declared in MSTextLayer-UISupport.h for getting textBehaviour name like 'Auto' / 'Fixed' or 'Auto Height'.

In the version 61 sketch use verticalAlignement / textAlignment for storing this information and now this data is store as int. Is there a new function or a new way to get the string according this number ?

Thank you for your help

how to get the type of a function's parameters

hi, I need to monitor keyboard event and mouse event in my sketch plugin. And I find "MSNormalEventHandler" has a function: "- (void)trackMouse:(id)arg1;". I think the parameter "(id)arg1" may be a function in JS, so my code is:
document._object.eventHandlerManager().normalHandler().trackMouse(
function(event){
log("get an event = "+event);
});
But, I get the error : "-[MOJavaScriptObject trackingState]: unrecognized selector sent to instance 0x60000bf829a0".
Would please tell me how solve this problem? Thank you very much.

Export requests are failing in update 44?

Hi,

Does anyone knows what they changed in exporting artboards in update 44?
I wrote a plugin to export artboards, but with the update the exported artboards are "empty".
I do see the PNG exported to the correct path (and everything is correct; the size, name, format etc.) but the PNG is "empty" (see screenshot)

screen shot 2017-05-17 at 15 50 41


The snippet I'm using to export the file is:

doc = context.document
var path // <-- assume this is a valid file URL
var layer // <-- assume this is a valid MSArtboardGroup
if (!layer.isLayerExportable()) {
    print([NSString stringWithFormat:"The layer [%@] is not exportable!", layer.name()])
    return
}

var requests = NSMutableArray.array()

for (var i = 0; i < layer.exportOptions().exportFormats().length; i++) {
    var format = layer.exportOptions().exportFormats()[i]
    var request = [MSExportRequest exportRequestFromExportFormat:format layer:layer inRect:layer.absoluteInfluenceRect() useIDForName:true]
    request.name = (format.name()) ? format.name() : request.name()
    requests.addObject(request)
}

// Loop all requests and export each of them
for(var k = 0; k < requests.length; k++) {
    var request = requests[k]
    exportName = request.name()
    exportPath = [path stringByAppendingPathComponent:exportName]
    exportPath = [exportPath stringByAppendingPathExtension:request.format()]

    [doc saveArtboardOrSlice:request toFile:exportPath]
    var msg = [NSString stringWithFormat:"Saved: %@ to %@", exportName, exportPath]
    log(msg)
}

Before the snippet worked perfectly, but right now I do see the message that the file is saved/exported but encounter the problems I stated before.

Does anyone knows what must be changed to export correctly?

The 53.1 commit broke all filenames :(

As of 2ed60ad, all the header filenames have changed (seems like each class has been split into sections) and it seems like some methods are missing. Not sure if this is working as intended?

Beta 56 is out

Beta 56 is out and I am trying to export the headers. I am running class-dump -r SketchModel.framework and receiving only errors. What command could I run to export those files?

PS: At the time of writing this the beta branch has not been updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.