Hide (abstract) classes from Intellisense - visual-studio-2010

I have several abstract classes is class library which would like to hide from Intelisence, how to do that?

Use the attributes, before the class declaration:
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
edit: if the class code is in your solution, it won't ever hide:
http://social.msdn.microsoft.com/forums/en-US/csharpide/thread/c2d2bd5a-97a5-4886-846d-759173476631/

Related

In which Class are these 'blade functions' startSection() and stopSection()?

When you open the cached view inside storage/framework/views/, there are rendered blade views and I can't find these functions:
$__env->startSection('content');
and
$__env->stopSection();
It's probably made with call_user_func() so you can't get to it just by clicking Ctrl+Click, this needs to be answered by someone who really knows the guts of Laravel :)
You can find these methods in the traits used on the Illuminate\View\Factory class.
https://github.com/laravel/framework/blob/5.8/src/Illuminate/View/Factory.php#L17-L23
This specific method is actually on the Illuminate\Views\Concerns\ManagesLayouts trait.
https://github.com/laravel/framework/blob/5.8/src/Illuminate/View/Concerns/ManagesLayouts.php
Also, in the constructor of that class you will see that $__env is shared with the view.
https://github.com/laravel/framework/blob/5.8/src/Illuminate/View/Factory.php#L99

Nativescript registerElement with constructor arguments

Can anyone help me with registerElement? I'm trying to register an element that has services in the constructor. I have the following code:
export class CardComponent extends ContentView implements OnInit{
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
super();
}
...
}
registerElement('app-card', () => CardComponent);
and I'm getting the error error TS2322: Type 'typeof CardComponent' is not assignable to type 'ViewClass'.
registerElement is designated to be used with NativeScript UI elements, anything that you might extend from the base View or any of its descendants (such as ContentView).
But these UI elements can not have Angular's life cycle hooks or dependency injections. I think you are trying to mix them up which won't be possible.
If you are willing to provide extensive Angular support for your custom UI element, then you should write a separate Angular component that might inherit the custom UI element. Something similar to RadListView vs RadListViewComponent.

Can we have a Master UserControl act as an interface to inherit from that?

In my windows phone 8 app I need to have a few UserControl which all of them have same functions (only the header not the body). I am wondered if i can have some thing like interface so i can inherit from that? (i could do it in ios with UIViewController)
If you're extending the same basic idea you may be best to look at creating a Custom Control and then adding what your body as Content inside it the control. You can then re-skin your custom control as you need in each case (and learn more about how controls work as a side-effect).
It's a bit more work than creating a UserControl, but it sounds appropriate for what you're doing and is the idiomatic way of solving this kind of problem in XAML/.NET (WP, Windows Store, WPF).
There is a good article on the differences between User Control and Custom Controls on WindowsPhoneGeek.
public abstract class MasterUserControl : UserControl
{
[...]
}
public class MyUserControl : MasterUserControl
{
}
Something like that?

iOS protocols and delegates. Basic questions

I'm creating an app that has a UITableView.
The data will be comming from an XML fetched over the net. I'm using NSXMLParser for this and it works. I used my tableView controller as the delegate for this so it implements the protocol for it:
#protocol NSXMLParserDelegate;
#interface MainView : UITableViewController <NSXMLParserDelegate>
Now this works perfectly, as I've nslogged the resulting parse.
Now, I want to populate the NStableView, so Reading I find that I need to add the datasource and delegate.
UITableViewDataSource
and
UITableViewDelegate
both of which are protocols.
How would I go about doing this on the same class? can I implement more than one protocol with the same class? should I move the delegation of the parser to another object and use this controller for this purpose?
Basically the question is what is the best way to do this?
thank you
Sure, you can implement as many protocols in a class as you want:
#interface MainView : UITableViewController <NSXMLParserDelegate, UITableViewDataSource, UITableViewDelegate>
Is that the "proper" way of doing that? I don't think there's a "right" answer to that. A purist might say no. I'd say do it where is makes sense, but err on the side of breaking it out into separate classes. For example, if your view controller is a simple menu then it would make sense for your view controller to also be your table view delegate and data source; there's no advantage in breaking it out into multiple classes.
If you have to parse XML my intuition suggests that it's starting to get a bit more complex. Maybe have a data class that implements the data source and XML parser and a controller class?

How to implement NSTableView class using (MVC) archiciture?

I want to implement MVC architicture in my project. So I have to implement NSObject class for NSTableView.But some delegate method is not called. How to implement this class? Please help me for this issue.
The Table View Programming Guide can teach you what you need to know.
The NSTableView class reference page lists some sample code for you to try out on your own

Resources